nike.Util = {
        isExplicitlyTrue: function(a) {
            return a === true || ((typeof a == "string") && a.toLowerCase() == "true")
        },
        invertSet: function(a) {
            var b;
            var c = {};
            for (b in a) {
                if (a.hasOwnProperty(b)) {
                    c[a[b]] = b
                }
            }
            return c
        },
        isDefined: function(a) {
            return a !== undefined && a !== null
        },
        isBlank: function(b) {
            var a = nike.Util.isDefined(b);
            if (a && typeof b == ("string")) {
                a = nike.util.StringUtil.trim(b) !== ""
            }
            return !a
        },
        apply: function(c, b) {
            var a;
            for (a in b) {
                if (b.hasOwnProperty(a)) {
                    c[a] = b[a]
                }
            }
            return c
        },
        applyWithMerge: function(d, c, b) {
            var a;
            if (b) {
                d = nike.Util.applyWithMerge(d, b)
            }
            for (a in c) {
                if (c.hasOwnProperty(a) && (d[a] && typeof d[a] === "object" && typeof c[a] === "object")) {
                    nike.Util.applyWithMerge(d[a], c[a], (b) ? b[a] : undefined)
                } else {
                    d[a] = c[a]
                }
            }
            return d
        },
        getObjectFromElementJSON: function(b) {
            var a = undefined;
            if (nike.Util.isDefined(b) && b.length > 0 && b.text().length > 0) {
                try {
                    a = $.parseJSON(b.text())
                } catch (c) {
                    nike.error("Error parsing json string in element: ", b, "Exception: ", c)
                }
            }
            return a
        }
    };
    nike.Util.minMax = function(c, b, a) {
        return c > a ? a : (c < b ? b : c)
    };
    nike.Util.createSliderMarkup = function() {
        $.each($(".review-attribute-slider"), function() {
            var b = parseFloat($(this).html());
            if (!isNaN(b)) {
                b = b > 7 ? 7 : (b < 0 ? 0 : b);
                var c = 22.8 * b;
                $(this).html("");
                var a = $('<div class="checkmark"><span class="hidden">' + b + "</span></div>").css("left", c);
                $(this).prepend(a)
            }
        })
    };
    nike.Util.resizeDistributionBars = function() {
        var c = 65;
        var e = 0;
        var b = [];
        var a = 0;
        $.each($(".distribution"), function() {
            b[a] = $(this);
            var h = parseInt($(".distribution-value", $(this)).html());
            if (h > e) {
                e = h
            }
            a++
        });
        for (a = 0;
        a < b.length;
        a++) {
            var g = parseInt($(".distribution-value", b[a]).html());
            if (!isNaN(g) && g > 0) {
                var d = (g / e) * c;
                var f = d + 5;
                $(".distribution-bar", b[a]).css("height", d);
                $(".distribution-value", b[a]).css("bottom", f)
            } else {
                $(".distribution-value", b[a]).html("")
            }
        }
    };
    nike.Util.formatMessage = function(a) {
        var b;
        if (typeof(a) != "undefined" && $.trim(a).length > 0) {
            if (arguments && arguments.length > 0) {
                for (b = 1;
                b < arguments.length;
                b++) {
                    if (arguments[b].length > 6) {
                        a = arguments[b]
                    } else {
                        a = a.replace("{" + (b - 1) + "}", arguments[b])
                    }
                }
            }
        } else {
            a = ""
        }
        return a
    };
    nike.Util.truncateString = function(a, d, c) {
        var a = (typeof a == "string" || typeof a == "number") ? a.toString() : "",
            d = (typeof d == "number") ? d : 5,
            c = (typeof c == "boolean") ? c : true;
        if (a.length > d) {
            var b = a.substring(0, d);
            b = c ? b + "..." : b;
            return b
        } else {
            return a
        }
    };
    nike.Util.cookiesEnabled = function() {
        var a;
        document.cookie = "revpSrvtareJnfUrer=Gehr";
        a = -1;
        if (document.cookie.length > 0 && document.cookie.indexOf("revpSrvtareJnfUrer=") > -1) {
            document.cookie = "revpSrvtareJnfUrer=Gehr; expires=Thu, 01-Jan-70 00:00:01 GMT";
            return true
        } else {
            return false
        }
    };
    nike.Util.css3support = (function() {
        var c = document.createElement("div"),
            b = "Webkit Moz O ms Khtml".split(" "),
            a = b.length;
        return function(d) {
            if (d in c.style) {
                return true
            }
            d = d.replace(/^[a-z]/, function(e) {
                return e.toUpperCase()
            });
            while (a--) {
                if (b[a] + d in c.style) {
                    return true
                }
            }
            return false
        }
    })();
    nike.Util.enforceTextAreaMaxLength = function() {
        $("textarea[maxlength]").change(function() {
            var a = $(this).val();
            if (a.length >= $(this).attr("maxlength")) {
                $(this).val(a.substring(0, 250))
            }
        });
        $("textarea[maxlength]").keypress(function(b) {
            var c = new Array(8, 37, 38, 39, 40, 46);
            if (!c.contains(b.keyCode)) {
                var a = $(this).val();
                if (a.length >= $(this).attr("maxlength")) {
                    return false
                }
            }
            return true
        })
    };
    nike.Util.htmlEncode = function(a) {
        return $("<div/>").text(a).html()
    };
    nike.Util.htmlDecode = function(a) {
        return $("<div/>").html(a).text()
    };
    nike.Util.getFormattedFlashVersion = function() {
        try {
            try {
                var a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
                try {
                    a.AllowScriptAccess = "always"
                } catch (b) {
                    return "6,0,0"
                }
            } catch (b) {}
            return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]
        } catch (b) {
            try {
                if (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
                    return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]
                }
            } catch (b) {}
        }
        return ""
    };
    nike.Util.hasFlash = function() {
        return nike.Util.getFormattedFlashVersion() !== ""
    };
    nike.Util.cleanupDatestamp = function(a) {
        var b = new Date(a.substring(0, a.indexOf(".")).replace(/-/g, "/").replace(/T/g, " "));
        return b.format("M jS, Y")
    };
    nike.Util.isDebugConsolePresent = function() {
        return $("#debug-console").exists()
    };
    nike.Util.changeUrlStyleColor = function(b, c, a) {
        return b.replace(/[A-Z0-9]{6}_[0-9]{3}/, c + "_" + a)
    };
    nike.Util.getBoolean = function(b, a) {
        var c;
        if (b === true || b === "true") {
            c = true
        } else {
            if (b === false || b === "false") {
                c = false
            } else {
                c = a
            }
        }
        return c
    };
    var image;
    var cb;
    nike.Util.checkImageLoaded = function(c, a, b) {
        c = c.length ? c[0] : c, a = a || function() {};
        if (!c.complete) {
            return false
        }
        if (typeof c.naturalWidth != "undefined" && c.naturalWidth == 0) {
            return false
        }
        if (b) {
            clearInterval(b)
        }
        setTimeout(function() {
            a()
        }, 100);
        return true
    };
    nike.namespace("nike.util");
    nike.Util.bind = function(a, b) {
        return function() {
            return a.apply(b, arguments)
        }
    };
    nike.Util.windowResizeListen = function(c) {
        function a(d) {
            nike.listen(nike.Event.WINDOW_RESIZE, d)
        }
        function b() {
            var g = 20,
                f = 0,
                d = function() {
                    nike.dispatchEvent(nike.Event.WINDOW_RESIZE);
                    window.clearTimeout(h);
                    e = false
                }, h, e = false;
            $(window).resize(function() {
                if (!e) {
                    var i = (new Date()).getTime();
                    if (f + g < i) {
                        f = i;
                        nike.dispatchEvent(nike.Event.WINDOW_RESIZE)
                    } else {
                        h = window.setTimeout(d, g);
                        e = true
                    }
                }
            })
        }
        b();
        a(c);
        nike.Util.windowResizeListen = a
    };
    nike.Util.windowScrollListen = function(c) {
        function a(d) {
            nike.listen(nike.Event.WINDOW_SCROLL, d)
        }
        function b() {
            $(window).scroll(function() {
                nike.dispatchEvent(nike.Event.WINDOW_SCROLL)
            })
        }
        b();
        a(c);
        nike.Util.windowScrollListen = a
    };
    nike.Util.windowHasScrolledListen = function(d) {
        var a = 100;

        function b(e) {
            nike.listen(nike.Event.WINDOW_HAS_SCROLLED, e)
        }
        function c() {
            $(window).scroll(nike.Function.createBuffered(function() {
                nike.dispatchEvent(nike.Event.WINDOW_HAS_SCROLLED)
            }, a))
        }
        c();
        b(d);
        nike.Util.windowHasScrolledListen = b
    };
    nike.Util.timeoutHelper = function(b, a) {
        var c = setTimeout(b, a);
        this.cleared = false;
        this.clear = function() {
            this.cleared = true;
            clearTimeout(c)
        }
    };
    nike.Util.addQaAttribute = function(b, a) {
        if (nike.ENV_CONFIG.renderDataQA != "true") {
            return
        }
        if (b.length === 0) {
            nike.error("QA Attribute '" + a + "' not applied. No target element supplied");
            return
        }
        if (b.length > 1) {
            nike.warn("QA Attribute '" + a + "' applied only to first target element supplied. QA Attribute values must be unique.")
        }
        $(b).eq(0).attr("data-qa", a)
    };
    nike.Util.endsWith = function(b, a) {
        nike.warn("Use nike.util.StringUtil.endsWith instead of nike.Util.endsWith.");
        return nike.util.StringUtil.endsWith(b, a)
    };
    nike.Util.equalsIgnoreCase = function(a, b) {
        nike.warn("Use nike.util.StringUtil.equalsIgnoreCase instead of nike.Util.equalsIgnoreCase.");
        return nike.util.StringUtil.equalsIgnoreCase(a, b)
    };
    nike.Util.trim = function(a) {
        nike.warn("Use nike.util.StringUtil.trim instead of nike.Util.trim.");
        return nike.util.StringUtil.trim(a)
    };
    nike.Util.ltrim = function(a) {
        nike.warn("Use nike.util.StringUtil.ltrim instead of nike.Util.ltrim.");
        return nike.util.StringUtil.ltrim(a)
    };
    nike.Util.rtrim = function(a) {
        nike.warn("Use nike.util.StringUtil.rtrim instead of nike.Util.rtrim.");
        return nike.util.StringUtil.rtrim(a)
    };
    nike.Util.getParameter = function(b, a) {
        nike.warn("Use nike.util.UrlUtil.getParameter instead of nike.Util.getParameter.");
        return nike.util.UrlUtil.getParameter(b, a)
    };
    nike.Util.addParameter = function(b, a, c) {
        nike.warn("Use nike.util.UrlUtil.addParameter instead of nike.Util.addParameter.");
        return nike.util.UrlUtil.addParameter(b, a, c)
    };
    nike.Util.getLValue = function(b, a) {
        nike.warn("Use nike.util.UrlUtil.getLValue instead of nike.Util.getLValue.");
        return nike.util.UrlUtil.getLValue(b, a)
    };
    nike.Util.getExternalReferrer = function() {
        nike.warn("Use nike.util.UrlUtil.getExternalReferrer instead of nike.Util.getExternalReferrer.");
        return nike.util.UrlUtil.getExternalReferrer()
    };
    nike.Util.parseUrlParams = function(a, b) {
        nike.warn("Use nike.util.UrlUtil.parseUrlParams instead of nike.Util.parseUrlParams.");
        nike.util.UrlUtil.parseUrlParams(a, b)
    };